#ifndef	__BASE_DB_OTL_H__
#define __BASE_DB_OTL_H__

#include "basedb.h"

#ifdef DLLEXPORT
#undef DLLEXPORT
#endif

#ifdef BASEDB_EXPORTS
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
#endif

#ifndef	_ORACLE

typedef CDBException otl_exception;

class DLLEXPORT otl_connect:public CDBConnect
{
public:	//	user public method
	static long otl_initialize(long nCommitFlag=1);
	long rlogon(const char * pLogonStr,const int nCommitFlag=1);
	long direct_exec(const char * pSQLCommand,long nExceptFlag=1);
	long logoff();
	long connected();
	long use(const char * pDatabase);
};

class DLLEXPORT otl_stream:public CDBStream
{
public:	//	user public method
	otl_stream(long nBuffer,const char * pSQLCommand,
		otl_connect &Connect,long nExceptFlag=1);
	long eof();
	void close();
	void flush();
	int is_null();
};

class DLLEXPORT otl_cursor
{
public:	//	user public method
	static long direct_exec(otl_connect & Connect,
		const char * pSQLCommand,const int nExceptFlag=1);
};

#endif	// not defile _ORACLE

#endif
